// 设备分组
import qs from "qs";
import request from "@/utils/request";

/**
 * 文件上传 - 图片
 * @return {*}
 */
export function fileUpload(formData) {
  return request({
    url: "/file/upload",
    method: "post",
    data: formData
    // body: formData
    // headers: {
    //   "Content-Type": "multipart/form-data"
    // }
  });
}
/**
 * 文件下载
 * @return {*}
 */
export function fileDownload(id) {
  return request({
    url: "/file/download?id=" + id,
    method: "get",
    responseType: "blob"
  });
}

/**
 * 文件激活
 * @return {*}
 */
export function fileEnable(data) {
  return request({
    url: "/file/fileEnable",
    method: "post",
    data
  });
}
